package Oct_2020.part1;

import java.util.ArrayList;

public class arrayList {
    public static void main(String[] args) {
        ArrayList<Employee> Staff=new ArrayList<>();
        Staff.add(new Employee("jack",true,18,10000));
        Staff.add(new Employee("julia",false,20,20000));
        Staff.add(new Employee("celia",false,30,30000));
        Staff.ensureCapacity(10);
        System.out.println(Staff.size());
        Staff.set(2,new Employee("lisa",false,25,40000));
        for (Employee e :
                Staff) {
            System.out.println(e.getName()+"  "+e.getSalary());
        }
    }
}
